$(function() {
	/*
	 * Troca de cor para jQuery Cycle & jQuery Color
	 * por Douglas Fernandes
	 */
	
	//Set hex colors. No hash infront. Just a 6 character HEX color code.
	//These are used in the same order your images are displayed.
	//If using jpgs make sure the colors are in the correct order & match the BG of your images.
	//IMPORTANT: the BG color of first image must be last. Color order would be (2, 3, 4, 1) instead of (1, 2, 3, 4).
	
	//var color = ['1B1C30', 'A6B823', 'E0C128','1E99BF'];
	var color = ['333333', '333333', '333333','333333'];
	
	//Create our custom transition to include the color fading transition.
	
	$.fn.cycle.transitions.color = function($cont, $slides, opts) {
		opts.fxFn = function(curr,next,opts,after) {
			$(curr).animate({ opacity: 0 }, 500);
			$('#container').animate({ backgroundColor: '#' + color[opts.currSlide] }, 500, function() {
				$(curr).css('display', 'none');
				$(next).css({ opacity: 0, display: 'block' }).animate({ opacity: 1 }, 500, function() {
					after();
				});
			});
		}
	}
	
	$('#slide').cycle({
		fx: 'color'
	});
	
});
